home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
newsgroups
/
misc.20000824-20010305
/
000309_news@columbia.edu _Mon Feb 19 10:16:20 2001.msg
< prev
next >
Wrap
Internet Message Format
|
2001-03-05
|
3KB
Return-Path: <news@columbia.edu>
Received: from watsun.cc.columbia.edu (watsun.cc.columbia.edu [128.59.39.2])
by monire.cc.columbia.edu (8.9.3/8.9.3) with ESMTP id KAA23622
for <kermit.misc@cpunix.cc.columbia.edu>; Mon, 19 Feb 2001 10:16:20 -0500 (EST)
Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id KAA02621
for <kermit.misc@watsun.cc.columbia.edu>; Mon, 19 Feb 2001 10:16:19 -0500 (EST)
Received: (from news@localhost)
by newsmaster.cc.columbia.edu (8.9.3/8.9.3) id KAA02846
for kermit.misc@watsun.cc.columbia.edu; Mon, 19 Feb 2001 10:13:53 -0500 (EST)
X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
From: fdc@columbia.edu (Frank da Cruz)
Subject: Re: commandline ftp-client
Date: 19 Feb 2001 15:13:52 GMT
Organization: Columbia University
Message-ID: <96rd7g$2os$1@newsmaster.cc.columbia.edu>
To: kermit.misc@columbia.edu
In article <96rbhi$hp2$1@news.hccnet.nl>,
Martijn Hams <mbhams@hotmail.com> wrote:
: How can i delete a dir on a ftpserver when it's not empty using
: kermit?
:
Thanks for taking a look at Kermit's new FTP client.
As you know, UNIX does not allow you to delete a non-empty directory,
so you must first delete all the files in the directory. Then you can
delete the directory.
: example:
:
: i connect to a ftpserver.
: i switch to the pub-dir with "ftp cd pub"
: how can i delete dir1 with all his subdirs with 1 command when the tree
: looks like this:
:
: /pub/dir1/dir2/dir3
:
Something like this requires cooperation between the client and the server.
Unfortunately FTP protocol does not allow for recursion (even though some
FTP servers do allow for it in a kind of backhanded way, unofficially).
There is a great debate over what the server's response should be to the
NLST command -- should it send a recursive list (even though the protocol
defines no way to ask for one) or a "flat" one? Should the list include
path information or just the basename? Should the list include directory
names? RFC 959 doesn't say. So as you can imagine, each FTP server can,
and usually does, interpret the specification differently. Kermit tries to
sense and handle each interpretation but if the server does not recurse,
there's not much the client can do about it.
If the FTP server returns a recursive file list with path information, then
Kermit's command:
ftp delete /recursive *
should delete the tree. You might also need to do something like this:
ftp delete /recursive .*
ftp delete /recursive *
to get the dot-files first, in case the FTP server's pattern matcher does
not pick up dot files.
There are Internet drafts circulating that propose a way to clear up all
this confusion, but so far they are not accepted and in any case you won't
find the new methods (e.g. the MLST command) implemented in any but a
few experimental FTP servers.
- Frank